package com.tone.ji_volunteer.controller;

import com.tone.ji_volunteer.pojo.Result;
import com.tone.ji_volunteer.pojo.Swiper;
import com.tone.ji_volunteer.service.AdvertiseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author tone(ang)
 * version 1.0
 */
@RestController
@Slf4j
@RequestMapping("/advertise")
public class SwiperController {
    @Autowired
    private AdvertiseService advertiseService;

    @GetMapping("/swiper")
    public Result getSwiper(){
        List<Swiper> swiperes =  advertiseService.getSwiper();
        return Result.success(swiperes);
    }
}
